<template>
  <demoBlock title="自定义图标">
    <vcu-cell is-link title="自定义图标" @click="showIconToast" />
    <vcu-cell is-link title="自定义图片" @click="showImageToast" />
    <vcu-cell is-link title="自定义加载图标" @click="showLoadingToast" />
  </demoBlock>
</template>

<script setup>
import { Toast } from "../../../components";
import { getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();

const showIconToast = () => {
  Toast.loading({
    message: "自定义图标",
    icon: "like",
  });
};

const showLoadingToast = () => {
  Toast.loading({
    message: "加载中...",
    forbidClick: true,
    loadingType: "spinner",
  });
};

const showImageToast = () => {
  Toast({
    message: "自定义图片",
    icon: `${proxy.serverIp}/images/logo.png`,
  });
};
</script>
